{{template "admin/public/head.html" .}}
<section>
	<aside>
		{{template "admin/public/nav.html" .}}
	</aside>
	<article>
		<div class="top-title">
			<dl>
				<dt><h1>{{.title}}</h1></dt>
				<dd><input type="text" class="input" id="search" placeholder="请输入您需要搜索的会员名字！" name="search"><input type="submit" value="搜索" class="button" /></dd>
				<!-- <dd><a href="wood_help.html"><i class="iconfont">&#xe649;</i>帮助文档</a></dd> -->
			</dl>
		</div>
		<div class="nav1">
			<ul>
				<a href="/admin/member/index"><li {{if eq .vid ""}}class="no"{{end}}>全部会员</li></a>
				{{range .vip}}
				<a href="/admin/member/index?vid={{.id}}"><li {{if eq $.vid .id}}class="no"{{end}}>{{.name}}</li></a>
				{{end}}
			</ul>
		</div>
		<div class="content">
			<div class="release">
				<dl>
					<dt><i class="iconfont">&#xe649;</i> <b>{{.title}}说明</b><br>
						<p>会员部分是通过微信登录获取到的信息</p>
					</dt>
					<!-- <dd><a href="/admin/member/add"><button type="button" class="button">添加会员</button></a></dd> -->
				</dl>
			</div>
			<!-- 会员列表 -->
			<table class="table">
				<thead><th width="25%">头像</th><th width="25%">会员信息</th><th width="25%">会员</th><th width="5%">操作</th></thead>
				{{range $i,$v := .info}}
				{{if $v}}
				<tr id="{{.id}}">
					<td class="center"><a href="/admin/member/content?id={{.id}}"><img src="{{.pathname}}" class="img-1" onerror="javascript:this.src='/static/img/admin/avatar.jpg'"></a></td>
					<td>
						{{.monicker}}<br>
					</td>
					<td>
						Vip：{{if .vipName}}<mark>{{.vipName}}</mark>{{else}}普通会员{{end}} 
					</td>
					<td class="operation">
						<a href="/admin/member/edit?id={{.id}}">编辑</a><br>
					</td>
				</tr>
				{{end}}
				{{end}}
				{{if .paginator}}
				{{if ne .paginator.totalpages 1}}
					<tr>
						<td  colspan="5">
							<div class="paging">
								{{if ne .paginator.currpage 1}}
								<a href="{{$.url}}page={{.paginator.firstpage}}">首页</a>
								<a href="{{$.url}}page={{.paginator.prevpage}}">&lt;&lt;</a>
								{{else}}
								<a class="disable">首页</a>
								<a class="disable">&lt;&lt;</a>
								{{end}}
								{{range $index,$page := .paginator.pages}}
								{{if eq $.paginator.currpage $page}} 
								<a class="no">{{$page}}</a>
								{{else}}
								<a href="{{$.url}}page={{$page}}">{{$page}}</a>
								{{end}}
								{{end}}
								{{if eq .paginator.currpage .paginator.totalpages}}
								<a class="disable">&gt;&gt;</a>
								<a class="disable">尾页</a>
								{{else}}
								<a href="{{$.url}}page={{.paginator.nextpage}}">&gt;&gt;</a>
								<a href="{{$.url}}page={{.paginator.totalpages}}">尾页</a>
								{{end}}
							</div>
						</td>
					</tr>
				{{end}}
				{{end}}
			</table>
		</div>
	</article>
</section>

<footer><!-- 系统监控内容 --></footer>
<script src="https://tcsc.oss-cn-hangzhou.aliyuncs.com/static/admin/js/jquery.jedate.min.js"></script>
<script src="https://tcsc.oss-cn-hangzhou.aliyuncs.com/static/admin/js/toast.js"></script>
<script src="https://tcsc.oss-cn-hangzhou.aliyuncs.com/static/admin/js/uppic.js"></script>
<script src="https://tcsc.oss-cn-hangzhou.aliyuncs.com/static/admin/js/xcConfirm.js"></script>
<script src="https://tcsc.oss-cn-hangzhou.aliyuncs.com/static/admin/js/app.js"></script>
<script>
	$('#search').keydown(function (e) {
		if (e.keyCode != 13) return
		search($(this).val().trim())
	})
	$('[type=submit]').click(function (){
		search($('#search').val().trim())
	})
	function search(val) {
		var vid = {{.vid}}
		var search = val
		location.search = '?vid=' + vid + '&search=' + search
	}
</script>
</body>
</html>
